1. Field of the Invention
The present invention relates to a detection method and apparatus in a network system, and more particularly, to a detection method and apparatus which uses dynamic host configuration protocol messages to detect a corresponding online state of a server of a network system.
2. Description of the Prior Art
With the development of information and communication technology and the corresponding increase in network requirements of users, user devices have evolved from computing host devices to mobile communication devices and portable electronic devices. Modern network systems include more and more servers to manage the network for providing network services. Many software and hardware equipments, such as internet protocol (IP) routers, wireless access points, Internet Connection Sharing of Microsoft operating systems, and so on, can be regarded as servers, however. In such a situation, the private server may affect normal operations in a local area network.
For example, when a user rends an IP address from an office network but obtains the IP address from a private server due to automatic configuration, the user cannot normally access the office network. In this case, the network managers must spend more time solving the user's problem by using network packet analysis software. In a network system, a user can normally use network services or access resources of the network via the assigned server providing the network services.
Please refer to FIG. 1, which is a schematic diagram of a prior art server S11 establishing network connections. In FIG. 1, if the server S11 installs the cloud operating system via a host H, the server S11 should rend a server IP address ServIP_H from the host H. Therefore, the server S11 broadcasts a discover packet DPKT_S11 to the network system before rending the server IP address ServIP_H, and waits for the host H to respond with an offer packet OPKT_H. Server S12, which also exists in the network system, responds first with an offer packet OPKT_S12 to the server S11 after receiving the discover packet DPKT_S11, so that the server S11 mistakenly uses a server IP address ServIP_S12 in the offer packet OPKT_S12 provided by the server S12 to connect to the network system, and further uses a request packet RPKT_S12 and an acknowledgement packet APKT_S12 to establish connections with the server S12. Therefore, the host H cannot successfully establish connections with the server S11 and will fail to execute the installing operations of the cloud operating system.
How to prevent failure to normally execute following operations because of rending the IP address from the unassigned server has therefore become a goal in the industry.